<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/template/templateAdmin.xhtml">
	<ui:define name="content">
	<br/><br/><br/>
	<center>
	<p class="SLSelectDate">#{msg.addUserToRep}</p>
	<br/><br/>
		<h:form class="editProfile">
			<h:outputText value="#{msg.addUser}: " />
			<h:selectOneMenu id="usList" value="#{addUserToRepController.userId}">
				<f:selectItems value="#{userDtoListController.validatedUserList}" var="c"
					itemLabel="#{c.name}" itemValue="#{c.id}" />
					<f:ajax event="change" render= "repList"/>
			</h:selectOneMenu>
			<h:outputText value="  "></h:outputText>
			<h:outputText value=" #{msg.toRep}: " />
			<h:selectOneMenu id="repList" value="#{addUserToRepController.currentRep}">
				<f:selectItems value="#{addUserToRepController.notMemberRepList}"
					var="r" itemLabel="#{r.repName}" itemValue="#{r.id}" />
			</h:selectOneMenu>
			<br /><br/><br/>
			<h:commandButton class="selectRepositoryButton" render="usList repList" value="#{msg.addUser}" action="#{addUserToRepController.addUserToRep}">
			</h:commandButton><h:outputText value=" "></h:outputText>
			<h:commandButton class="selectRepositoryButton" value="#{msg.cancel}"
				action="adminPage.xhtml" />
		</h:form>
		</center>
	</ui:define>
</ui:composition>
</html>